using INTEX.DataBase;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.Collections.Generic;
namespace WPFExcelReport
{
    public partial class VWTGEW
    {
        VWTEINZ _VWZ;
        public VWTEINZ VWZ
        {
            get
            {
                if (_VWZ == null) _VWZ = new VWTEINZ();
                return _VWZ;
            }
        }

        public DataSet LOADBYWS(Dictionary<string, object> pm)
        {

            dwData = TBMain.NewRow();
            dwData["WTGMANDANT"] = app.Mandant;
            dwData["WTGART"] = pm["ART"].ToString();
            dwData["WTGVAR"] = pm["VAR"].ToString();
            SResult = QWTGEW01(dwData);
            return SResult;
        }
        public DataSet CREATEBYWS(Dictionary<string, object> pm)
        {
            dwData = TBMain.NewRow();
            SetUpNewRow(ref dwData);
            dwData["WTGMANDANT"] = app.Mandant;
            dwData["WTGART"] = pm["ART"].ToString();
            dwData["WTGVAR"] = pm["VAR"].ToString();
            TBMain.Rows.InsertAt(dwData, 0);
            InsertWTGEW(dwData);
            return SResult;
        }
        public virtual void Copy(Dictionary<string, object> pm)
        {
            string tart = (string)pm["TART"];
            string sart = (string)pm["SART"];
            PM["ART"] = sart.PadRight(20);
            PM["VAR"] = "  ";
            SResult = LOADBYWS(PM);

            foreach (DataRow dwSrc in SResult.Tables[0].Copy().Rows)
            { 
                dwData = TBMain.NewRow();
                dwData.ItemArray = dwSrc.ItemArray;
                dwData["WTGART"] = tart.PadRight(20);
                TBMain.Rows.InsertAt(dwData, 0);
                DWTGEW01(dwData);
                InsertWTGEW(dwData);
            }
        }
    }
    public partial class VWTGEW
    {
        public string WTGMANDANT { get { if (dwMaster == null) return ""; return dwMaster["WTGMANDANT"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGMANDANT"] = value; OnPropertyChanged("WTGMANDANT", value); } } //lENGth 2
        public string WTGART { get { if (dwMaster == null) return ""; return dwMaster["WTGART"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGART"] = value; OnPropertyChanged("WTGART", value); } } //lENGth 20
        public string WTGVAR { get { if (dwMaster == null) return ""; return dwMaster["WTGVAR"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGVAR"] = value; OnPropertyChanged("WTGVAR", value); } } //lENGth 2
        public string WTGAENB { get { if (dwMaster == null) return ""; return dwMaster["WTGAENB"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGAENB"] = value; OnPropertyChanged("WTGAENB", value); } } //lENGth 8
        public double WTGAEND { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGAEND"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGAEND"] = value; OnPropertyChanged("WTGAEND", value); } } //lENGth 0
        public string WTGNEUB { get { if (dwMaster == null) return ""; return dwMaster["WTGNEUB"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGNEUB"] = value; OnPropertyChanged("WTGNEUB", value); } } //lENGth 8
        public double WTGNEUD { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGNEUD"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGNEUD"] = value; OnPropertyChanged("WTGNEUD", value); } } //lENGth 0
        public double WTGWBBRT { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGWBBRT"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGWBBRT"] = value; OnPropertyChanged("WTGWBBRT", value); } } //lENGth 0
        public double WTGWBF { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGWBF"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGWBF"] = value; OnPropertyChanged("WTGWBF", value); } } //lENGth 0
        public double WTGFDISM { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGFDISM"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGFDISM"] = value; OnPropertyChanged("WTGFDISM", value); } } //lENGth 0
        public double WTGFDLGS { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGFDLGS"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGFDLGS"] = value; OnPropertyChanged("WTGFDLGS", value); } } //lENGth 0
        public double WTGFDLFS { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGFDLFS"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGFDLFS"] = value; OnPropertyChanged("WTGFDLFS", value); } } //lENGth 0
        public string WTGSFLG { get { if (dwMaster == null) return ""; return dwMaster["WTGSFLG"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGSFLG"] = value; OnPropertyChanged("WTGSFLG", value); } } //lENGth 15
        public string WTGKCOL { get { if (dwMaster == null) return ""; return dwMaster["WTGKCOL"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGKCOL"] = value; OnPropertyChanged("WTGKCOL", value); } } //lENGth 1
        public string WTGREAPPI { get { if (dwMaster == null) return ""; return dwMaster["WTGREAPPI"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGREAPPI"] = value; OnPropertyChanged("WTGREAPPI", value); } } //lENGth 15
        public string WTGRNAME { get { if (dwMaster == null) return ""; return dwMaster["WTGRNAME"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGRNAME"] = value; OnPropertyChanged("WTGRNAME", value); } } //lENGth 15
        public double WTGNFTOLM { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGNFTOLM"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGNFTOLM"] = value; OnPropertyChanged("WTGNFTOLM", value); } } //lENGth 0
        public double WTGNFTOLP { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WTGNFTOLP"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGNFTOLP"] = value; OnPropertyChanged("WTGNFTOLP", value); } } //lENGth 0

        #region======ColumnSchema==========
        /*
                 public string WTGKUNDNR { get { if (dwMaster == null) return ""; return dwMaster["WTGKUNDNR"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGKUNDNR"] = value; OnPropertyChanged("WTGKUNDNR", value); } } //lENGth 8
                 public string WTGWERK { get { if (dwMaster == null) return ""; return dwMaster["WTGWERK"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGWERK"] = value; OnPropertyChanged("WTGWERK", value); } } //lENGth 3
                 public string WTGABT { get { if (dwMaster == null) return ""; return dwMaster["WTGABT"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGABT"] = value; OnPropertyChanged("WTGABT", value); } } //lENGth 3
                 public double WTGAENZL { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGAENZL"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGAENZL"] = value; OnPropertyChanged("WTGAENZL", value); } } //lENGth 0
                 public double WTGSMTRS { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGSMTRS"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGSMTRS"] = value; OnPropertyChanged("WTGSMTRS", value); } } //lENGth 0
                 public string WTGREAPPI { get { if (dwMaster == null) return ""; return dwMaster["WTGREAPPI"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGREAPPI"] = value; OnPropertyChanged("WTGREAPPI", value); } } //lENGth 15
                 public string WTGRNAME { get { if (dwMaster == null) return ""; return dwMaster["WTGRNAME"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGRNAME"] = value; OnPropertyChanged("WTGRNAME", value); } } //lENGth 15
                 public string WTGCHORE { get { if (dwMaster == null) return ""; return dwMaster["WTGCHORE"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGCHORE"] = value; OnPropertyChanged("WTGCHORE", value); } } //lENGth 1
                 public double WTGRDENS { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGRDENS"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGRDENS"] = value; OnPropertyChanged("WTGRDENS", value); } } //lENGth 0
                 public double WTGRDENSTM { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGRDENSTM"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGRDENSTM"] = value; OnPropertyChanged("WTGRDENSTM", value); } } //lENGth 0
                 public double WTGRDENSTP { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGRDENSTP"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGRDENSTP"] = value; OnPropertyChanged("WTGRDENSTP", value); } } //lENGth 0
                 public double WTGKARTEN { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGKARTEN"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGKARTEN"] = value; OnPropertyChanged("WTGKARTEN", value); } } //lENGth 0
                 public double WTGPLATINEN { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGPLATINEN"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGPLATINEN"] = value; OnPropertyChanged("WTGPLATINEN", value); } } //lENGth 0
                 public double WTGNOPPEN { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGNOPPEN"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGNOPPEN"] = value; OnPropertyChanged("WTGNOPPEN", value); } } //lENGth 0
                 public double WTGANZRAPP { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGANZRAPP"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGANZRAPP"] = value; OnPropertyChanged("WTGANZRAPP", value); } } //lENGth 0
                 public double WTGRWRAPH { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGRWRAPH"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGRWRAPH"] = value; OnPropertyChanged("WTGRWRAPH", value); } } //lENGth 0
                 public double WTGRWRAPB { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGRWRAPB"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGRWRAPB"] = value; OnPropertyChanged("WTGRWRAPB", value); } } //lENGth 0
                 public double WTGRWRAPHFD { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGRWRAPHFD"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGRWRAPHFD"] = value; OnPropertyChanged("WTGRWRAPHFD", value); } } //lENGth 0
                 public double WTGRWRAPBFD { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGRWRAPBFD"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGRWRAPBFD"] = value; OnPropertyChanged("WTGRWRAPBFD", value); } } //lENGth 0
                 public string WTGPANELS { get { if (dwMaster == null) return ""; return dwMaster["WTGPANELS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGPANELS"] = value; OnPropertyChanged("WTGPANELS", value); } } //lENGth 3
                 public string WTGSHEDS { get { if (dwMaster == null) return ""; return dwMaster["WTGSHEDS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGSHEDS"] = value; OnPropertyChanged("WTGSHEDS", value); } } //lENGth 1
                 public double WTGNFLRH { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGNFLRH"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGNFLRH"] = value; OnPropertyChanged("WTGNFLRH", value); } } //lENGth 0
                 public string WTGNFLRA { get { if (dwMaster == null) return ""; return dwMaster["WTGNFLRA"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGNFLRA"] = value; OnPropertyChanged("WTGNFLRA", value); } } //lENGth 3
                 public double WTGMFLRH { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGMFLRH"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGMFLRH"] = value; OnPropertyChanged("WTGMFLRH", value); } } //lENGth 0
                 public string WTGMFLRA { get { if (dwMaster == null) return ""; return dwMaster["WTGMFLRA"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGMFLRA"] = value; OnPropertyChanged("WTGMFLRA", value); } } //lENGth 3
                 public double WTGMFTOLM { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGMFTOLM"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGMFTOLM"] = value; OnPropertyChanged("WTGMFTOLM", value); } } //lENGth 0
                 public double WTGMFTOLP { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGMFTOLP"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGMFTOLP"] = value; OnPropertyChanged("WTGMFTOLP", value); } } //lENGth 0
                 public double WTGHFLRH { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGHFLRH"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGHFLRH"] = value; OnPropertyChanged("WTGHFLRH", value); } } //lENGth 0
                 public string WTGHFLRA { get { if (dwMaster == null) return ""; return dwMaster["WTGHFLRA"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGHFLRA"] = value; OnPropertyChanged("WTGHFLRA", value); } } //lENGth 3
                 public double WTGHFTOLM { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGHFTOLM"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGHFTOLM"] = value; OnPropertyChanged("WTGHFTOLM", value); } } //lENGth 0
                 public double WTGHFTOLP { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["WTGHFTOLP"].ToString()); } set { if (dwMaster == null) return; dwMaster["WTGHFTOLP"] = value; OnPropertyChanged("WTGHFTOLP", value); } } //lENGth 0
                 public string WTGFILLER { get { if (dwMaster == null) return ""; return dwMaster["WTGFILLER"].ToString(); } set { if (dwMaster == null) return; dwMaster["WTGFILLER"] = value; OnPropertyChanged("WTGFILLER", value); } } //lENGth 50
        */
        #endregion
    }
}
